package com;

import java.util.Objects;

/**
 * @author MaoLin Wang
 * @description
 * @date 2020/9/5 5:18 下午
 */
public class User {
    private int age;
    private String name;
    private String email;


    @Override
    public int hashCode() {
        return Objects.hash(age, name, email);
    }

    public static void main(String[] args) {
        User user=new User();
        user.email="1";
        user.name="2";
        User user1=user;
        System.out.println(user.equals(user1));
    }
}
